<div ng-controller="FapiaoActualCtrl as vm">
  <h1 class="page-title">发票详情</h1>
  <div class="well">
    <div class="row">
      <div class="span3">
      <label class="control-label" for="input01">发票号</label>
        <p><strong>{{vm.actual.invoiceNumber}}</strong></p>
        <label class="control-label" for="input01">发票日期</label>
        <p><strong>{{vm.actual.invoiceDate | date:"yyyy-MM-dd"}}</strong></p>
        <label class="control-label" for="input01">承运人及纳税人识别号</label>
        <p><strong>{{vm.actual.carrierObj}}</strong></p>
        <label class="control-label" for="input01">发货人及纳税识别号</label>
        <p><strong>{{vm.actual.shipperObj}}</strong></p>
        <label class="control-label" for="input01">收货人及纳税识别号</label>
        <p><strong>{{vm.actual.receiverObj}}</strong></p>
        <label class="control-label" for="input01">运输货物信息</label>
        <p><strong>{{vm.actual.cargoInfo}}</strong></p>
        <label class="control-label" for="input01">车种车号</label>
        <p><strong>{{vm.actual.vehicleObj || '无'}}</strong></p>
        <label class="control-label" for="input01">车船吨位</label>
        <p><strong>{{vm.actual.vehicle.capacity || '无'}}吨</strong></p>
      </div>
      <div class="span3">
        <label class="control-label" for="input01">实际受票方及纳税人识别号</label>
        <p><strong>{{vm.actual.shipperObj}}</strong></p>
        <label class="control-label" for="input01">起运地、经由、到达地</label>
        <p><strong>{{vm.actual.route || '无'}}</strong></p>
        <label class="control-label" for="input01">费用项目</label>
        <p><strong>运输费</strong></p>
        <label class="control-label" for="input01">合计金额</label>
        <p><strong style="color:red">{{vm.actual.price|currency:"￥"}}</strong></p>
        <br/>
        <a target="_blank" ng-href="/api/{{vm.actual.invoiceAttachment}}"><i class="icon-eye-open"></i>查看发票附件</a>
          <button ng-show="vm.userRole=='admin' && vm.actual.status>0" class="btn btn-primary" ng-click="vm.revert()">状态回退
          </button>
      </div>
    </div>
    <div class="table-responsive">
      <table class="table table-striped table-bordered">
        <thead>
          <tr>
            <th>运单号</th>
            <th>运费金额</th>
            <th>支付状态</th>
            <th>线路</th>
            <th>司机</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="order in vm.actual.orders">
            <td>{{order.orderId}}</td>
            <td>{{order.price}}</td>
            <td>{{order.paid? '已付款':'未付款'}}</td>
            <td>{{order.route}}</td>
            <td>{{order.driver.name}}</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>